//  专门请求home模块的接口

import http from "./request.js";

async function getbanner() {
    let res = await http("/small4/banner/list");
    console.log(res);
    return res.data;
}
//用同步的方式写异步的代码
//async函数的返回值永远是一个promise对象

async function getlist() {
    let res = await http("/small4/cms/news/list");
    console.log(res);
    return res.data;
}

async function getfen(){
    let res=await http("/small4/shop/goods/kanjia/list")
    console.log(res);
    return res;
}

async function getqian(){
    let res=await http("/small4/score/sign")
    console.log(res);
    return res;
}

async function getwen(){
    let res=await http("/small4/cms/news/detail")
    console.log(res);
    return res;
}

async function getlists(){
    let res=await http("/small4/shop/goods/list")
    console.log(res);
    return res;
}

async function getshoplist() {
    let res = await http("/small4/shop/goods/category/all");
    console.log(res);
    return res.data;
}

export {
    getbanner,
    getlist,
    getfen,
    getqian,
    getwen,
    getlists,
    getshoplist,
};